home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / General / ViewIt™ 2.24 Shareware / FaceWare / FaceWare.rsrc / TEXT_1246_7. Include Files.txt < prev    next >
Text File  |  1994-04-10  |  2KB  |  17 lines

  1. 7. Include Files
  2.   All FaceWare modules require the presence of two include files, FaceStorXY and FaceProcXY, where "XY" denotes a compiler and "include file" is being used to refer to any file that must be included in some language/compiler-specific way with the main programming project.
  3.  
  4. FaceStorXY File
  5.   This file contains constants that define FaceIt and ViewIt commands, plus a large fRec record that is used by FaceWare modules.  The fRec record is divided into several sections that serve different purposes:
  6.  - the f variables at the top typically contain information about the current state of the program (fActiveWnd, for example, is the active window's window pointer)
  7.  - the u variables are scratch variables used by FaceWare modules to transfer info (uName, for example, is used to pass the name of a resource file to DoInit)
  8.  - the v variables contain information about the current state of a ViewIt window (vSelectCtl, for example, is the selected control's control handle)
  9.  - the w variables either return information about a hit in a ViewIt window or info about the ViewIt window (wcHit, for example, is the number of the control hit)
  10. - the c variables return information about a control in a ViewIt window when ViewIt's GetCtl command is executed (cControl, for example, is the control's control handle)
  11.   A complete list of fRec variables is presented in the "fRec Record" topic under "Commands".  In most cases, however, you will learn about variables and commands in the context in which they are used, and there is no need to know much about the contents of FaceStorXY.
  12.  
  13. FaceProcXY File
  14.   This file contains the "FaceIt" dispatching procedure that is used to call all FaceWare modules.  This procedure (with the help of the LoadIt module) finds, loads, and jumps to the module associated with the command being executed.  The module jumped to can be in the program file, the program's resource file, or a shared FaceWare file (discussed in next topic).  This scheme provides a single, uniform interface to all FaceWare modules.
  15.  
  16. Other Include Files
  17.   Some modules require an additional include file to define commands or a special record that is specific to that module (e.g., DrawIt's "DrawStorXY" defines a drRec and DrawIt commands, DocuBase's "DBaseStorXY" defines a dbRec and DocuBase commands, etc.).